package com.gagakuai.transcation;

import com.gagakuai.session.TransactionIsolationLevel;

import javax.sql.DataSource;
import java.sql.Connection;
import java.util.Properties;

/*
 * @program: common-starters
 * @description: 事务管理器
 * @author: houhong
 * @create: 2023-06-29 20:59
 */
public interface TransactionFactory {


    void setProperties(Properties props);


    Transaction newTransaction(Connection conn);

    Transaction newTransaction(DataSource dataSource, TransactionIsolationLevel level, boolean autoCommit);
}